#!/bin/bash

# this is an sample shell script
# you will need to develop this to
# complete the assignment for week 7

echo "Test Case 1: Testing 21/30..."

tc=`java -jar Grades_v2.jar 21 30`

if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi

echo "Test Case 2: Testing 23/27..."

tc=`java -jar Grades_v2.jar 23 27`

if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi

echo "Test Case 3: Testing 65/4..."

tc=`java -jar Grades_v2.jar 65 4`

if [ "$tc" = "Pass" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi

echo "Test Case 4: Testing 10/2..."

tc=`java -jar Grades_v2.jar 10 2`

if [ "$tc" = "Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi

echo "Test Case 5: Testing 90/90"

tc=`java -jar Grades_v2.jar 90 90`

if [ "$tc" = "Pass with distinction" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi

echo ===========================
echo ====Test Complete==========
echo ===========================

